/*
 ============================================================================
 Name		: Flashbox4AppView.cpp
 Author	  : ceze
 Copyright   : FlashBox for ver.Zhongyou(???)
 Description : Application view implementation
 ============================================================================
 */

// INCLUDE FILES
#include <coemain.h>
#include "Flashbox4MainContainer.h"
#include "ConstDefined.hrh"
#include "Flashbox4.hrh"
#include "Flashbox4.mbg"//mbm鍥惧ご鏂囦欢
#include "Flashbox4_0x20021B21.rsg"
#include <eiklabel.h>  
#include <W32STD.H>
#include <stringloader.h>
#include "FbUtils.h"
#include <BAUTILS.H>
#include <aknquerydialog.h>
#include <APMSTD.H> 
#include <apgcli.h>
#include <APACMDLN.H>

#ifdef ADD_OPTION
#include "FbListData.h"
#endif

// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CFlashbox4AppView::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CFlashbox4MainContainer::ConstructL(const TRect& aRect,
		TInt aActiveTabIndex)
{
	// Create a window for this application view
	CreateWindowL();
	////选项菜单列表
#ifdef ADD_OPTION
	InitialOption();
#endif
	//软键区softkeybar
		m_pSoftKeyBar = CFbSoftKeyBar::NewLC(KFbSoftKeyRect, this, this);
		SetSoftKeyBarL(ESoftkeybar_Option_Change, EFalse);
		CleanupStack::Pop(m_pSoftKeyBar);
	
		//内容窗口
	m_pContentWindow = new (ELeave) CFbContentWindow;
	CleanupStack::PushL(m_pContentWindow);
	m_pContentWindow->ConstructL(KFbContentWindowRect, this);
	CleanupStack::Pop();
	m_CurrentPageLevel = 1;
	
	//PingBao and Laidian Eject Option!
	InitialEjectOption();

	//top tab
	m_pTopTabgroup = CFbTabgroupTop::NewLC(KFbTabgroupRect, this);
	//m_pTabgroup->SetContainerWindowL (*this );
	InitializeTabGroupL(m_pTopTabgroup);
	//m_pTopTabgroup->SetRect (KFbTabgroupRect );
	m_pTopTabgroup->SetActiveL();
	m_pTopTabgroup->SetObserver(this);
	m_pTopTabgroup->SetActiveTabByIndexL(aActiveTabIndex);
	CleanupStack::Pop(m_pTopTabgroup);// 寮瑰嚭娓呴櫎鏍�;

	


	// Set the windows size
	SetRect(aRect);
	// Activate the window, which makes it ready to be drawn
	ActivateL();
}

// -----------------------------------------------------------------------------
// CFlashbox4AppView::~CFlashbox4AppView()
// Destructor.
// -----------------------------------------------------------------------------
//
CFlashbox4MainContainer::~CFlashbox4MainContainer()
{
	// No implementation required
	delete m_pTopTabgroup;
	delete m_pContentWindow;
	delete m_pOptionList;
	delete m_pSoftKeyBar;
	delete m_pOptInfo;
	delete m_pEjectOption;
}

// -----------------------------------------------------------------------------
// CFlashbox4AppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CFlashbox4MainContainer::Draw(const TRect& /*aRect*/) const
{
	// Get the standard graphics context
	CWindowGc& gc = SystemGc();

	// Gets the control's extent
	TRect drawRect(Rect());
	//------------------Activate Option! Show Alpha Effect!------<BEGIN>-----//	
	if (IsDimmed() || m_pOptionList->IsVisible() || m_pEjectOption->IsVisible())
	{
		gc.SetBrushColor(KFbOptionBackColorAlpha);
		gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
		gc.DrawRect(drawRect);
		return;
	}
	//------------------Activate Option! Show Alpha Effect!------<END>-----//

	gc.SetPenStyle(CGraphicsContext::ESolidPen);
	gc.SetPenColor(KFbTabgroupTopColor);
	gc.SetBrushColor(KFbBackgroundColor);
	gc.SetBrushStyle(CGraphicsContext::ESolidBrush);
	gc.DrawRect(drawRect);

}

// -----------------------------------------------------------------------------
// CFlashbox4AppView::SizeChanged()
// Called by framework when the view size is changed.
// -----------------------------------------------------------------------------
//
void CFlashbox4MainContainer::SizeChanged()
{
	DrawNow();
}

/**
 * From CoeControl,CountComponentControls.
 */
TInt CFlashbox4MainContainer::CountComponentControls() const
{
	if (m_pOptInfo)
		return 6;
	else
		return 5; // return nbr of controls inside this container
}

/**
 * From CCoeControl,ComponentControl.
 */
CCoeControl* CFlashbox4MainContainer::ComponentControl(TInt aIndex) const
{
	switch (aIndex)
	{
	case 0:
		return m_pTopTabgroup;
	case 1:
		return m_pContentWindow;
	case 2:
		return m_pSoftKeyBar;
	case 3:
		return m_pOptionList;
	case 4:
		return m_pEjectOption;
	case 5:
		return m_pOptInfo;
	default:
		return NULL;
	}
}

/**
 * tab 鍒囨崲浜嬩欢
 */
void CFlashbox4MainContainer::TabChangedL(TInt /*aTabIndex*/, TInt aTabId)
{
	m_pSoftKeyBar->ShowInfomation(R_TIP_GETMORE);
	
	TContentsType contentType = (TContentsType) 0;
	if (m_pContentWindow)
	{
		switch (aTabId)
		{
		case EMbmFlashbox4Tabmanhuashu:
			contentType = EDong_man_shu_ba;
			break;
		case EMbmFlashbox4Tabpingbao:
			contentType = EPing_bao_tian_di;
			break;
		case EMbmFlashbox4Tablaidian:
			contentType = ELai_dian_ku_shan;
			break;
		case EMbmFlashbox4Tabgame:
			contentType = EYou_xi_cheng_bao;
			break;
		case EMbmFlashbox4Zhazhi:
			contentType = EZha_zhi_kuai_di;
			break;
		case EMbmFlashbox4Tabkatong:
			contentType = EKa_tong_yuan_xian;
			break;
		case EMbmFlashbox4Tabmv:
			contentType = EMV_le_yuan;
			break;
		}
		m_pContentWindow->ChangeToCategory(contentType, ETypeLocal);
	}

}

/**
 * 鍒濆鍖朤abgroup
 */
void CFlashbox4MainContainer::InitializeTabGroupL(CFbTabgroupTop *pTabgroup)
{
	if (pTabgroup == NULL)
		return;

	for (int i = 0; i < KFbTabitemsCount; i++)
	{
		TInt resId = EMbmFlashbox4Tabmanhuashu + 2 * i;
		pTabgroup->AddTabL(resId, KFlashboxImagePath, resId, resId + 1,
				EMbmFlashbox4Tabtopbar, R_TAB_ITEM_TEXT1 + i);
	}

}

/**
 * From CoeControl,
 * 鎸夐敭浜嬩欢鎺ユ敹澶勭悊
 */
TKeyResponse CFlashbox4MainContainer::OfferKeyEventL(
		const TKeyEvent &aKeyEvent, TEventCode aType)
{
	TKeyResponse keyResponse = EKeyWasNotConsumed;

	//0.当按下功能键时取消菜单显示
	if (EKeyApplication0 == aKeyEvent.iCode && m_pOptionList->IsVisible())
	{
		m_pOptionList->MakeVisible(EFalse);
		MakeAllVisableExceptOpt(ETrue);
		return EKeyWasConsumed;
	}

	//1.由软键区最先处理按键事件
	if (m_pSoftKeyBar && !(m_pEjectOption->IsVisible()))
	{
		keyResponse = m_pSoftKeyBar->OfferKeyEventL(aKeyEvent, aType);
		if (keyResponse == EKeyWasConsumed)
			return EKeyWasConsumed;
	}
	//

	if (IsDimmed())
	{
		return EKeyWasConsumed;
	}

	//2.由选项菜单处理
	if (m_pOptionList && m_pOptionList->IsVisible())
	{
		return m_pOptionList->OfferKeyEventL(aKeyEvent, aType);
		//if(keyResponse == EKeyWasConsumed)
		//	return EKeyWasConsumed;
	}
	
	if(m_pEjectOption && m_pEjectOption->IsVisible())
	{
		return m_pEjectOption->OfferKeyEventL(aKeyEvent, aType);
	}

	//3.由关于或帮助页面处理按键
	if (m_pOptInfo && m_pOptInfo->IsVisible())
	{
		return m_pOptInfo->OfferKeyEventL(aKeyEvent, aType);
	}

	//按8键,启动wap浏览
	if (aKeyEvent.iCode == 56 )
	{
		//启动wap浏览器
		TInt KBrowserUid = 0x10008D39; // the inner browser's id 
		TUid id (TUid::Uid (KBrowserUid ) );
		TApaTaskList taskList (CEikonEnv::Static ()->WsSession () );//Accesses tasks running on a device.
		TApaTask task = taskList.FindApp (id );
		
		if (task.Exists () )//测试任务是否存在
		{
			task.SendMessage (TUid::Uid (0 ), KWapUrl8 ); // UID is not used
			task.BringToForeground ();
		}
		else
		{
			RApaLsSession apaLsSession;
			User::LeaveIfError (apaLsSession.Connect () );
			TThreadId thread;
			User::LeaveIfError (apaLsSession.StartDocument (KWapUrl, id, thread ) );
		}
		return	EKeyWasConsumed;
	}
	
	//4.由tab处理
	if (m_pTopTabgroup)
	{
		keyResponse = m_pTopTabgroup->OfferKeyEventL(aKeyEvent, aType);
		if (keyResponse == EKeyWasConsumed)
			return EKeyWasConsumed;
	}
	
	
	
	//5.最后由内容区处理
	if (m_pContentWindow)
	{
		if(aKeyEvent.iCode == EKeyDevice3)
		{
			TContentsType CatgType = (TContentsType) m_pContentWindow->GetCategoryType();

			CFbListData *pItem = m_pContentWindow->m_pContentList->GetListItem(
					m_pContentWindow->m_pContentList->GetFocusedIndex());
			
			if (pItem == NULL)
			{
				return EKeyWasNotConsumed;
			}
			
			if ( CatgType == EDong_man_shu_ba && m_CurrentPageLevel == 1)
			{
				m_CurrentPageLevel = 2;
				UpdateOption(EOption_Main2Level);
			}
			if(CatgType == EPing_bao_tian_di || CatgType == ELai_dian_ku_shan)
			{
				if(m_pContentWindow->GetStoreType() == ETypeLocal)
				{
					UpdateEjectOption(CatgType);
					UpdateEjectOptionRectPos();
					m_pSoftKeyBar->SetDimmed(ETrue);//MakeVisible(EFalse);
					m_pEjectOption->MakeVisible(ETrue);
					MakeAllVisableExceptOpt(EFalse);
					return EKeyWasConsumed;
				}
			}
		}
		keyResponse = m_pContentWindow->OfferKeyEventL(aKeyEvent, aType);
	}

	return keyResponse;
}

/**
 * from MListObserver
 * 选项菜单事件处理
 */
void CFlashbox4MainContainer::ListItemEvent(CFbList *pHandle, TInt /*aItemIndex*/,
		TInt aItemId, TInt aEventType)
{

#ifdef ADD_OPTION
	if (aEventType == EItemSelected)
	{
		m_pSoftKeyBar->SetDimmed(EFalse);
		m_pSoftKeyBar->DrawNow();
		MakeAllVisableExceptOpt(ETrue);
		if (pHandle == m_pOptionList)
		{
		//	CFbListData *pItem = pHandle->GetListItem(aItemIndex);
		//	TInt seletedItemId = pItem->GetItemId();

			m_pOptionList->MakeVisible(EFalse);
			
			switch (aItemId)
			{
			case EOptionId_open:
			case EOptionId_pageup:
			case EOptionId_pagedown:
			case EOptionId_return:
			case EOptionId_update:
			case EOptionId_delete:
				
				m_pContentWindow->HandleParentOptionMsg(aItemId);//EOptionId_open
				break;
			case EOptionId_setting:
				TInt activeTabIndex = m_pTopTabgroup->GetActiveTabIndex();
				GetAppUi()->ActiveViewL(ESettingViewId, activeTabIndex);
				break;
			case EOptionId_help:
				if (m_pOptInfo)
					delete m_pOptInfo;
				m_pOptInfo = CFbInformation::NewL(R_INFO_HELP_TITLE,
						KFbHelpFileName, KFbAboutInfoRect, *this);
				break;
			case EOptionId_about:
				if (m_pOptInfo)
					delete m_pOptInfo;
				m_pOptInfo = CFbInformation::NewL(R_INFO_ABOUT_TITLE,
						KFbAboutFileName, KFbAboutInfoRect, *this);
				break;
			case EOptionId_cancel:
				//MakeAllVisableExceptOpt(ETrue);
				break;

			case EOptionId_exit:
				CAknQueryDialog* exitdlg = CAknQueryDialog::NewL();
				HBufC* msg = StringLoader::LoadL(R_EXIT_PROMPT_TEXT);
				if(exitdlg->ExecuteLD(R_CONFIRM_PROMPT, *msg))
				{
					delete msg;
					GetAppUi()->Exit();
				}
				delete msg;
				break;

			default:
				break;
			}
			if (aItemId == EOptionId_help || aItemId
					== EOptionId_about)
			{				
				SetSoftKeyBarL(ESoftkeybar_Null_Return);
				m_pSoftKeyBar->ShowTime();				
				MakeAllVisableExceptOpt(EFalse);
				//m_pOptInfo->DrawNow();
			}
		}
		
		if(pHandle == m_pEjectOption)
		{
			m_pEjectOption->MakeVisible(EFalse);
			//MakeAllVisableExceptOpt(ETrue);
			switch(aItemId)
			{
			case 0:
				m_pContentWindow->HandleParentEjectOptionMsg(aItemId);
				break;
			case 1:
				SetSelectedFile((TContentsType)m_pContentWindow->GetCategoryType(), 
						m_pContentWindow->m_pContentList->GetFocusedIndex());
				GetAppUi()->ActiveViewL(ESettingViewId, m_pTopTabgroup->GetActiveTabIndex());
				break;
			case 2:				
				break;
			}
		}		
	}
#endif
}

void CFlashbox4MainContainer::InitialOption()
{
	//m_pOptionList
	m_pOptionList = CFbList::NewL(KFbOptionRect, this, EStyleOptionMenu);
	m_pOptionList->SetObserver(this);
	m_pOptionList->SetBackground(KFbOptionFrameColor, KFbOptionBackColor, NULL);
	m_pOptionList->MakeVisible(EFalse);
	m_pOptionList->SetTextColor(KRgbWhite,KRgbBlack);
	UpdateOption(EOption_Main);
}

void CFlashbox4MainContainer::UpdateOption(TOptionType aPageId/*TBool bCanOverPage*/)
{
	TInt OptionLength = 0;

	switch (aPageId)
	{
	case EOption_ProMain:
	case EOption_Main:
	case EOption_Main2Level:
		OptionLength = 6;
		break;
	case EOption_MainOverPage:
	case EOption_Main2LevelOverPage:
		OptionLength = 8;
		break;
	}

	m_pOptionList->RemoveAll();

	for (TInt i = 0; i < OptionLength; i++)
	{
		CFbListData *pListItem = new (ELeave) CFbListData(
				KFbOptionIdArray[aPageId][i]);
		CleanupStack::PushL(pListItem);
		pListItem->ConstructL(R_OPTION_BROWSER + KFbOptionIdArray[aPageId][i]);
		m_pOptionList->AddItemL(pListItem);
		CleanupStack::Pop();//pListItem
	}

}

void CFlashbox4MainContainer::MakeAllVisableExceptOpt(TBool bEnable)
{
	m_pTopTabgroup->MakeVisible(bEnable);
	m_pContentWindow->MakeVisible(bEnable);
	DrawNow();
}

/**
 * 进入不可用状态(半透明)
 */
void CFlashbox4MainContainer::SetDimmed(TBool aDimmed)
{
	CCoeControl::SetDimmed(aDimmed);	

	MakeAllVisableExceptOpt(!aDimmed);	
}

/**
 * 设置软键softkeybar选项
 */
void CFlashbox4MainContainer::SetSoftKeyBarL(const TInt aTypeIndex,
		TBool aDrawNow)
{
	if (m_pSoftKeyBar == NULL)
		return;

	switch (aTypeIndex)
	{
	case ESoftkeybar_Option_Exit://选项-退出
		m_pSoftKeyBar->SetLeftKeyL(EMainContainerKeyOption, R_SOFT_KEY_OPTION );//
		m_pSoftKeyBar->SetRightKeyL(EMainContainerKeyExit, R_SOFT_KEY_EXIT);
		break;
	case ESoftkeybar_Option_Change://选项-切换
		m_pSoftKeyBar->SetLeftKeyL(EMainContainerKeyOption, R_SOFT_KEY_OPTION );//
		m_pSoftKeyBar->SetRightKeyL(EMainContainerKeyChange, R_SOFT_KEY_CHANGE );
		break;
	case ESoftkeybar_Null_Return:// -返回
		m_pSoftKeyBar->SetLeftKeyL(-1, -1);//
		m_pSoftKeyBar->SetRightKeyL(EMainContainerKeyReturn, R_SOFT_KEY_RETURN);
		break;
	case ESoftkeybar_Null_Cancel: //-取消
		m_pSoftKeyBar->SetLeftKeyL(-1, -1);//
		m_pSoftKeyBar->SetRightKeyL(EMainContainerKeyCancel, R_SOFT_KEY_CANCEL);
		break;
	case ESoftkeybar_Option_Local:
		m_pSoftKeyBar->SetLeftKeyL(EMainContainerKeyOption, R_SOFT_KEY_OPTION );//
		m_pSoftKeyBar->SetRightKeyL(EMainContainerKeyChange, R_SOFT_KEY_LOCAL );
		break;
	case ESoftkeybar_Option_Remote:
		m_pSoftKeyBar->SetLeftKeyL(EMainContainerKeyOption, R_SOFT_KEY_OPTION );//
		m_pSoftKeyBar->SetRightKeyL(EMainContainerKeyChange, R_SOFT_KEY_REMOTE );
		break;
	default:
		m_pSoftKeyBar->SetLeftKeyL(-1, -1);//
		m_pSoftKeyBar->SetRightKeyL(-1, -1);
		break;
	}

	if (aDrawNow)
		m_pSoftKeyBar->DrawNow();
}

/**
 * 派生自SoftKeyBar, 软键事件
 */
void CFlashbox4MainContainer::SoftKeyEvent(TInt aKeyId)
{
	switch (aKeyId)
	{
	case EMainContainerKeyOption:
		if (m_pOptionList)
		{
			m_pSoftKeyBar->SetDimmed(!m_pSoftKeyBar->IsDimmed());
			m_pOptionList->MakeVisible(!m_pOptionList->IsVisible());
			if (m_pOptionList->IsVisible())
				MakeAllVisableExceptOpt(EFalse);
			else
				MakeAllVisableExceptOpt(ETrue);
		}
		break;
	case EMainContainerKeyChange:
		if (m_pContentWindow && !m_pOptionList->IsVisible())
		{
			m_pContentWindow->SwitchContentL(0);
		}
		break;
	case EMainContainerKeyReturn:
		SetSoftKeyBarL(ESoftkeybar_Option_Change);
		//m_pSoftKeyBar->DrawNow ();
		m_pOptInfo->MakeVisible(EFalse);
		MakeAllVisableExceptOpt(ETrue);
		break;
	case EMainContainerKeyCancel:
		if (m_pContentWindow)
			m_pContentWindow->CancelHttpQueryL();
		break;
	default:
		break;
	}
}

void CFlashbox4MainContainer::InitialEjectOption()
{
	m_pEjectOption = CFbList::NewL(KFbEjectOption, this, EStyleOptionMenu);
	m_pEjectOption->SetObserver(this);
	m_pEjectOption->SetBackground(KFbEjectOptionBackColor, KFbEjectOptionFocusItemColor, NULL);
	m_pEjectOption->SetFocusedBackground(KFbEjectOptionBackColor,-1);
	m_pEjectOption->MakeVisible(EFalse);
	m_pEjectOption->SetTextColor(KRgbBlack,KRgbWhite);
	
	CFbListData *pListItem = new (ELeave) CFbListData(0);
	CleanupStack::PushL(pListItem);
	pListItem->ConstructL(R_OPTION_PROVIEW);
	m_pEjectOption->AddItemL(pListItem);
	
	CFbListData *pListItem1 = new (ELeave) CFbListData(1);
	CleanupStack::PushL(pListItem1);
	pListItem1->ConstructL(R_OPTION_SET_TO_SCREENP);
	m_pEjectOption->AddItemL(pListItem1, 1);
	
	CFbListData *pListItem2 = new (ELeave) CFbListData(2);
	CleanupStack::PushL(pListItem2);
	pListItem2->ConstructL(R_OPTION_RETURN);
	m_pEjectOption->AddItemL(pListItem2, 2);
	
	CleanupStack::Pop(3);	

}

void CFlashbox4MainContainer::UpdateEjectOption(TContentsType aCategoryType)
{
	m_pEjectOption->RemoveItem(1);

	CFbListData *pListItem = new (ELeave) CFbListData(1);
	CleanupStack::PushL(pListItem);
	switch(aCategoryType)
	{
	case EPing_bao_tian_di:
		pListItem->ConstructL(R_OPTION_SET_TO_SCREENP);
		break;
	case ELai_dian_ku_shan:
		pListItem->ConstructL(R_OPTION_SET_TO_CALLIN);
		break;
	default:
		CleanupStack::Pop();
		return;
	}
	m_pEjectOption->AddItemL(pListItem, 1);
	CleanupStack::Pop();//pListItem	
}

void CFlashbox4MainContainer::SetSelectedFile(TContentsType aCategoryType, TInt aItemIndex)
{
	CFbListData	*pItem = m_pContentWindow->m_pContentList->GetListItem(aItemIndex);
	
	if(!pItem)
			return;
	
	RFileWriteStream wt;
	wt.PushL (); // in on cleanup stack
	BaflUtils::EnsurePathExistsL (GetAppUi()->m_fs, KFbSystemSettingsFile );
	
	if (wt.Replace (GetAppUi()->m_fs, KFbSystemSettingsFile, EFileWrite ) == KErrNone )
	{
		switch (aCategoryType)
		{
		case EPing_bao_tian_di:
			GetAppUi()->m_pSettingPingbao->m_isOn = ETrue;
			GetAppUi()->m_pSettingPingbao->m_fileId = pItem->GetItemId();
			GetAppUi()->m_pSettingPingbao->m_FileName.Copy(*pItem->GetTitle());
			GetAppUi()->m_pSettingPingbao->m_IconPath.Copy(*pItem->m_pIconUrl);
			GetAppUi()->m_pSettingPingbao->m_FilePath.Copy(KFbContentsPath);
			AddDrive(GetAppUi()->m_pSettingPingbao->m_FilePath);
			GetAppUi()->m_pSettingPingbao->m_FilePath.AppendFormat(
					_L("\\data\\394\\%d.swf"), GetAppUi()->m_pSettingPingbao->m_fileId);
			break;
		case ELai_dian_ku_shan:
			GetAppUi()->m_pSettingLaidian->m_isOn = ETrue;
			GetAppUi()->m_pSettingLaidian->m_fileId = pItem->GetItemId();
			GetAppUi()->m_pSettingLaidian->m_FileName.Copy(*pItem->GetTitle());
			GetAppUi()->m_pSettingLaidian->m_IconPath.Copy(*pItem->m_pIconUrl);
			GetAppUi()->m_pSettingLaidian->m_FilePath.Copy(KFbContentsPath);
			AddDrive(GetAppUi()->m_pSettingLaidian->m_FilePath);
			GetAppUi()->m_pSettingLaidian->m_FilePath.AppendFormat(
					_L("\\data\\395\\%d.swf"), GetAppUi()->m_pSettingLaidian->m_fileId);
			break;
		}
		GetAppUi()->WriteDataToStreamL(wt, GetAppUi()->m_pSettingPingbao);
		GetAppUi()->WriteDataToStreamL(wt, GetAppUi()->m_pSettingLaidian);
		wt.Close();
	}
	wt.Pop ();
}

void CFlashbox4MainContainer::UpdateEjectOptionRectPos()
{
	TRect tmpRect = KFbEjectOption;
	tmpRect.iTl.iY = m_pContentWindow->m_pContentList->GetFocusItemPosY() + 2;
	tmpRect.iBr.iY = tmpRect.iTl.iY + 70;
	m_pEjectOption->SetRect(tmpRect);
}
// End of File
